package com.demo.ex04.one2one.entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.demo.common.entity.BaseEntity;

@Entity
@Table(name="t_heart")
public class Heart  extends BaseEntity<Long>
{
	private String heartCode;
	
	private Body body;

	public String getHeartCode() {
		return heartCode;
	}

	@OneToOne(mappedBy="heart")
	public Body getBody() {
		return body;
	}

	public void setBody(Body body) {
		this.body = body;
	}

	public void setHeartCode(String heartCode) {
		this.heartCode = heartCode;
	}
	
	
}
